import request from '@/axios'

export const getSnListApi = (params: any) => {
  return request.get({ url: '/admin/serialnumber', params })
}
export const getSnAddApi = (params: any) => {
  return request.post({ url: '/admin/serialnumber', data: params })
}
export const getSnDiscardApi = (params: any) => {
  return request.post({ url: '/admin/serialnumber/discard', data: params })
}

export const getSnEnumApi = (params?: any) => {
  return request.get({ url: '/admin/serialnumber/fieldEnum', params })
}

export const getSnDetailApi = (sn_id?: any) => {
  return request.get({ url: `/admin/serialnumber/${sn_id}` })
}

export const getSnlogListApi = (params: any) => {
  return request.get({ url: '/admin/serialnumber/scanlog', params })
}

export const getScanCodeApi = (params: any) => {
  return request.post({ url: '/admin/serialnumber/scanCode', data: params })
}
